<?php

namespace App\Repository\Models;

use Illuminate\Database\Eloquent\Model;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;

/**
 * Class SysArticle.
 *
 * @package namespace App\Repository\Models;
 */
class SysArticle extends Model implements Transformable
{
    use TransformableTrait;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $table='sys_article';
    protected $fillable = ['id','pid','fid','title','content','come_from','sort','auth','created_at','updated_at','type_id','audit','recommend'];

    public function category(){
        return $this->hasOne(ArticleCategory::class,'id','fid');
    }
}
